<template>
  <div class="box">
    <textarea
      name=""
      id=""
      cols="30"
      rows="10"
      class="editor"
      v-model="template"
    ></textarea>
    <div class="preview"><preview :template="template"></preview></div>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from "vue"
import preview from "../components/preview.vue"

const template = ref<string>(``)
</script>

<style lang="scss" scoped>
.box {
  display: flex;
  width: 100%;
  height: 100vh;
  border: 1px solid #333;
  .editor {
    flex: 3;
    border-right: 1px solid;
  }
  .preview {
    flex: 7;
  }
}
</style>
